;
(function () {
    var _excluded = ["visible", "features", "ourProps", "theirProps"],
        _excluded2 = ["as"],
        _excluded3 = ["features"],
        _excluded4 = ["features", "initialFocus", "containers"],
        _excluded5 = ["force"],
        _excluded6 = ["target"],
        _excluded7 = ["open", "initialFocus"];

    function _objectDestructuringEmpty(t) {
        if (null == t) throw new TypeError("Cannot destructure " + t);
    }

    function _toConsumableArray(r) {
        return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread();
    }

    function _nonIterableSpread() {
        throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
    }

    function _arrayWithoutHoles(r) {
        if (Array.isArray(r)) return _arrayLikeToArray(r);
    }

    function _toArray(r) {
        return _arrayWithHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableRest();
    }

    function _iterableToArray(r) {
        if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r);
    }

    function _slicedToArray(r, e) {
        return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest();
    }

    function _nonIterableRest() {
        throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
    }

    function _iterableToArrayLimit(r, l) {
        var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
        if (null != t) {
            var e, n, i, u, a = [], f = !0, o = !1;
            try {
                if (i = (t = t.call(r)).next, 0 === l) {
                    if (Object(t) !== t) return;
                    f = !1;
                } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0) ;
            } catch (r) {
                o = !0, n = r;
            } finally {
                try {
                    if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return;
                } finally {
                    if (o) throw n;
                }
            }
            return a;
        }
    }

    function _arrayWithHoles(r) {
        if (Array.isArray(r)) return r;
    }

    function ownKeys(e, r) {
        var t = Object.keys(e);
        if (Object.getOwnPropertySymbols) {
            var o = Object.getOwnPropertySymbols(e);
            r && (o = o.filter(function (r) {
                return Object.getOwnPropertyDescriptor(e, r).enumerable;
            })), t.push.apply(t, o);
        }
        return t;
    }

    function _objectSpread(e) {
        for (var r = 1; r < arguments.length; r++) {
            var t = null != arguments[r] ? arguments[r] : {};
            r % 2 ? ownKeys(Object(t), !0).forEach(function (r) {
                _defineProperty(e, r, t[r]);
            }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) {
                Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));
            });
        }
        return e;
    }

    function _objectWithoutProperties(e, t) {
        if (null == e) return {};
        var o, r, i = _objectWithoutPropertiesLoose(e, t);
        if (Object.getOwnPropertySymbols) {
            var n = Object.getOwnPropertySymbols(e);
            for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]);
        }
        return i;
    }

    function _objectWithoutPropertiesLoose(r, e) {
        if (null == r) return {};
        var t = {};
        for (var n in r) if ({}.hasOwnProperty.call(r, n)) {
            if (-1 !== e.indexOf(n)) continue;
            t[n] = r[n];
        }
        return t;
    }

    function _classCallCheck(a, n) {
        if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function");
    }

    function _defineProperties(e, r) {
        for (var t = 0; t < r.length; t++) {
            var o = r[t];
            o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o);
        }
    }

    function _createClass(e, r, t) {
        return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", {writable: !1}), e;
    }

    function _typeof(o) {
        "@babel/helpers - typeof";
        return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
            return typeof o;
        } : function (o) {
            return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
        }, _typeof(o);
    }

    function _createForOfIteratorHelper(r, e) {
        var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
        if (!t) {
            if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) {
                t && (r = t);
                var _n4 = 0, F = function F() {
                };
                return {
                    s: F, n: function n() {
                        return _n4 >= r.length ? {done: !0} : {done: !1, value: r[_n4++]};
                    }, e: function e(r) {
                        throw r;
                    }, f: F
                };
            }
            throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
        }
        var o, a = !0, u = !1;
        return {
            s: function s() {
                t = t.call(r);
            }, n: function n() {
                var r = t.next();
                return a = r.done, r;
            }, e: function e(r) {
                u = !0, o = r;
            }, f: function f() {
                try {
                    a || null == t.return || t.return();
                } finally {
                    if (u) throw o;
                }
            }
        };
    }

    function _unsupportedIterableToArray(r, a) {
        if (r) {
            if ("string" == typeof r) return _arrayLikeToArray(r, a);
            var t = {}.toString.call(r).slice(8, -1);
            return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0;
        }
    }

    function _arrayLikeToArray(r, a) {
        (null == a || a > r.length) && (a = r.length);
        for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
        return n;
    }

    function _defineProperty(e, r, t) {
        return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
            value: t,
            enumerable: !0,
            configurable: !0,
            writable: !0
        }) : e[r] = t, e;
    }

    function _toPropertyKey(t) {
        var i = _toPrimitive(t, "string");
        return "symbol" == _typeof(i) ? i : i + "";
    }

    function _toPrimitive(t, r) {
        if ("object" != _typeof(t) || !t) return t;
        var e = t[Symbol.toPrimitive];
        if (void 0 !== e) {
            var i = e.call(t, r || "default");
            if ("object" != _typeof(i)) return i;
            throw new TypeError("@@toPrimitive must return a primitive value.");
        }
        return ("string" === r ? String : Number)(t);
    }

    System.register(['./index-legacy-BBSVeb5I.js'], function (exports, module) {
        'use strict';

        var useId, inject, watchEffect, computed, ref, cloneVNode, h$1, Fragment, defineComponent, onMounted,
            onUnmounted, watch, shallowRef, provide, Teleport, reactive, getCurrentInstance, nextTick, mergeModels,
            useModel, createBlock, createCommentVNode, withCtx, createBaseVNode, createVNode, unref, mergeProps,
            renderSlot, openBlock;
        return {
            setters: [function (module) {
                useId = module.ai;
                inject = module.ab;
                watchEffect = module.U;
                computed = module.f;
                ref = module.e;
                cloneVNode = module.aj;
                h$1 = module.Q;
                Fragment = module.F;
                defineComponent = module.d;
                onMounted = module.K;
                onUnmounted = module.ak;
                watch = module.w;
                shallowRef = module.T;
                provide = module.al;
                Teleport = module.a7;
                reactive = module.C;
                getCurrentInstance = module.am;
                nextTick = module.V;
                mergeModels = module.J;
                useModel = module.m;
                createBlock = module.c;
                createCommentVNode = module.k;
                withCtx = module.p;
                createBaseVNode = module.b;
                createVNode = module.q;
                unref = module.u;
                mergeProps = module.aa;
                renderSlot = module.I;
                openBlock = module.o;
            }],
            execute: function execute() {
                function t$4(e) {
                    typeof queueMicrotask == "function" ? queueMicrotask(e) : Promise.resolve().then(e).catch(function (o) {
                        return setTimeout(function () {
                            throw o;
                        });
                    });
                }

                function o$3() {
                    var a = [],
                        s = {
                            addEventListener: function addEventListener(e, t, r, i) {
                                return e.addEventListener(t, r, i), s.add(function () {
                                    return e.removeEventListener(t, r, i);
                                });
                            },
                            requestAnimationFrame: function (_requestAnimationFrame) {
                                function requestAnimationFrame() {
                                    return _requestAnimationFrame.apply(this, arguments);
                                }

                                requestAnimationFrame.toString = function () {
                                    return _requestAnimationFrame.toString();
                                };
                                return requestAnimationFrame;
                            }(function () {
                                var t = requestAnimationFrame.apply(void 0, arguments);
                                s.add(function () {
                                    return cancelAnimationFrame(t);
                                });
                            }),
                            nextFrame: function nextFrame() {
                                for (var _len = arguments.length, e = new Array(_len), _key = 0; _key < _len; _key++) {
                                    e[_key] = arguments[_key];
                                }
                                s.requestAnimationFrame(function () {
                                    s.requestAnimationFrame.apply(s, e);
                                });
                            },
                            setTimeout: function (_setTimeout) {
                                function setTimeout() {
                                    return _setTimeout.apply(this, arguments);
                                }

                                setTimeout.toString = function () {
                                    return _setTimeout.toString();
                                };
                                return setTimeout;
                            }(function () {
                                var t = setTimeout.apply(void 0, arguments);
                                s.add(function () {
                                    return clearTimeout(t);
                                });
                            }),
                            microTask: function microTask() {
                                for (var _len2 = arguments.length, e = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
                                    e[_key2] = arguments[_key2];
                                }
                                var t = {
                                    current: true
                                };
                                return t$4(function () {
                                    t.current && e[0]();
                                }), s.add(function () {
                                    t.current = false;
                                });
                            },
                            style: function style(e, t, r) {
                                var i = e.style.getPropertyValue(t);
                                return Object.assign(e.style, _defineProperty({}, t, r)), this.add(function () {
                                    Object.assign(e.style, _defineProperty({}, t, i));
                                });
                            },
                            group: function group(e) {
                                var t = o$3();
                                return e(t), this.add(function () {
                                    return t.dispose();
                                });
                            },
                            add: function add(e) {
                                return a.push(e), function () {
                                    var t = a.indexOf(e);
                                    if (t >= 0) {
                                        var _iterator = _createForOfIteratorHelper(a.splice(t, 1)),
                                            _step;
                                        try {
                                            for (_iterator.s(); !(_step = _iterator.n()).done;) {
                                                var _r = _step.value;
                                                _r();
                                            }
                                        } catch (err) {
                                            _iterator.e(err);
                                        } finally {
                                            _iterator.f();
                                        }
                                    }
                                };
                            },
                            dispose: function dispose() {
                                var _iterator2 = _createForOfIteratorHelper(a.splice(0)),
                                    _step2;
                                try {
                                    for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
                                        var _e = _step2.value;
                                        _e();
                                    }
                                } catch (err) {
                                    _iterator2.e(err);
                                } finally {
                                    _iterator2.f();
                                }
                            }
                        };
                    return s;
                }

                var r;
                var n$4 = Symbol("headlessui.useid"),
                    o$2 = 0;
                var i$5 = (r = useId) != null ? r : function () {
                    return inject(n$4, function () {
                        return "".concat(++o$2);
                    })();
                };

                function o$1(e) {
                    var l;
                    if (e == null || e.value == null) return null;
                    var n = (l = e.value.$el) != null ? l : e.value;
                    return n instanceof Node ? n : null;
                }

                function u$5(r, n) {
                    if (r in n) {
                        var _e2 = n[r];
                        for (var _len3 = arguments.length, a = new Array(_len3 > 2 ? _len3 - 2 : 0), _key3 = 2; _key3 < _len3; _key3++) {
                            a[_key3 - 2] = arguments[_key3];
                        }
                        return typeof _e2 == "function" ? _e2.apply(void 0, a) : _e2;
                    }
                    var t = new Error("Tried to handle \"".concat(r, "\" but there is no handler defined. Only defined handlers are: ").concat(Object.keys(n).map(function (e) {
                        return "\"".concat(e, "\"");
                    }).join(", "), "."));
                    throw Error.captureStackTrace && Error.captureStackTrace(t, u$5), t;
                }

                var i$4 = Object.defineProperty;
                var d$3 = function d$3(t, e, r) {
                    return e in t ? i$4(t, e, {
                        enumerable: true,
                        configurable: true,
                        writable: true,
                        value: r
                    }) : t[e] = r;
                };
                var n$3 = function n$3(t, e, r) {
                    return d$3(t, _typeof(e) != "symbol" ? e + "" : e, r), r;
                };
                var s$2 = /*#__PURE__*/function () {
                    function s() {
                        _classCallCheck(this, s);
                        n$3(this, "current", this.detect());
                        n$3(this, "currentId", 0);
                    }

                    return _createClass(s, [{
                        key: "set",
                        value: function set(e) {
                            this.current !== e && (this.currentId = 0, this.current = e);
                        }
                    }, {
                        key: "reset",
                        value: function reset() {
                            this.set(this.detect());
                        }
                    }, {
                        key: "nextId",
                        value: function nextId() {
                            return ++this.currentId;
                        }
                    }, {
                        key: "isServer",
                        get: function get() {
                            return this.current === "server";
                        }
                    }, {
                        key: "isClient",
                        get: function get() {
                            return this.current === "client";
                        }
                    }, {
                        key: "detect",
                        value: function detect() {
                            return typeof window == "undefined" || typeof document == "undefined" ? "server" : "client";
                        }
                    }]);
                }();
                var c$2 = new s$2();

                function i$3(r) {
                    if (c$2.isServer) return null;
                    if (r instanceof Node) return r.ownerDocument;
                    if (r != null && r.hasOwnProperty("value")) {
                        var _n = o$1(r);
                        if (_n) return _n.ownerDocument;
                    }
                    return document;
                }

                var c$1 = ["[contentEditable=true]", "[tabindex]", "a[href]", "area[href]", "button:not([disabled])", "iframe", "input:not([disabled])", "select:not([disabled])", "textarea:not([disabled])"].map(function (e) {
                    return "".concat(e, ":not([tabindex='-1'])");
                }).join(",");
                var N$3 = function (n) {
                        return n[n.First = 1] = "First", n[n.Previous = 2] = "Previous", n[n.Next = 4] = "Next", n[n.Last = 8] = "Last", n[n.WrapAround = 16] = "WrapAround", n[n.NoScroll = 32] = "NoScroll", n;
                    }(N$3 || {}),
                    T$2 = function (o) {
                        return o[o.Error = 0] = "Error", o[o.Overflow = 1] = "Overflow", o[o.Success = 2] = "Success", o[o.Underflow = 3] = "Underflow", o;
                    }(T$2 || {}),
                    F = function (t) {
                        return t[t.Previous = -1] = "Previous", t[t.Next = 1] = "Next", t;
                    }(F || {});

                function E$2() {
                    var e = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : document.body;
                    return e == null ? [] : Array.from(e.querySelectorAll(c$1)).sort(function (r, t) {
                        return Math.sign((r.tabIndex || Number.MAX_SAFE_INTEGER) - (t.tabIndex || Number.MAX_SAFE_INTEGER));
                    });
                }

                var h = function (t) {
                    return t[t.Strict = 0] = "Strict", t[t.Loose = 1] = "Loose", t;
                }(h || {});

                function w$3(e) {
                    var r = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
                    var t;
                    return e === ((t = i$3(e)) == null ? void 0 : t.body) ? false : u$5(r, _defineProperty(_defineProperty({}, 0, function _() {
                        return e.matches(c$1);
                    }), 1, function _() {
                        var l = e;
                        for (; l !== null;) {
                            if (l.matches(c$1)) return true;
                            l = l.parentElement;
                        }
                        return false;
                    }));
                }

                var y$2 = function (t) {
                    return t[t.Keyboard = 0] = "Keyboard", t[t.Mouse = 1] = "Mouse", t;
                }(y$2 || {});
                typeof window != "undefined" && typeof document != "undefined" && (document.addEventListener("keydown", function (e) {
                    e.metaKey || e.altKey || e.ctrlKey || (document.documentElement.dataset.headlessuiFocusVisible = "");
                }, true), document.addEventListener("click", function (e) {
                    e.detail === 1 ? delete document.documentElement.dataset.headlessuiFocusVisible : e.detail === 0 && (document.documentElement.dataset.headlessuiFocusVisible = "");
                }, true));

                function S$1(e) {
                    e == null || e.focus({
                        preventScroll: true
                    });
                }

                var H$2 = ["textarea", "input"].join(",");

                function I(e) {
                    var r, t;
                    return (t = (r = e == null ? void 0 : e.matches) == null ? void 0 : r.call(e, H$2)) != null ? t : false;
                }

                function O(e) {
                    var r = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function (t) {
                        return t;
                    };
                    return e.slice().sort(function (t, l) {
                        var o = r(t),
                            i = r(l);
                        if (o === null || i === null) return 0;
                        var n = o.compareDocumentPosition(i);
                        return n & Node.DOCUMENT_POSITION_FOLLOWING ? -1 : n & Node.DOCUMENT_POSITION_PRECEDING ? 1 : 0;
                    });
                }

                function P(e, r) {
                    var _ref = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {},
                        _ref$sorted = _ref.sorted,
                        t = _ref$sorted === void 0 ? true : _ref$sorted,
                        _ref$relativeTo = _ref.relativeTo,
                        l = _ref$relativeTo === void 0 ? null : _ref$relativeTo,
                        _ref$skipElements = _ref.skipElements,
                        o = _ref$skipElements === void 0 ? [] : _ref$skipElements;
                    var m;
                    var i = (m = Array.isArray(e) ? e.length > 0 ? e[0].ownerDocument : document : e == null ? void 0 : e.ownerDocument) != null ? m : document,
                        n = Array.isArray(e) ? t ? O(e) : e : E$2(e);
                    o.length > 0 && n.length > 1 && (n = n.filter(function (s) {
                        return !o.includes(s);
                    })), l = l != null ? l : i.activeElement;
                    var x = function () {
                            if (r & 5) return 1;
                            if (r & 10) return -1;
                            throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last");
                        }(),
                        p = function () {
                            if (r & 1) return 0;
                            if (r & 2) return Math.max(0, n.indexOf(l)) - 1;
                            if (r & 4) return Math.max(0, n.indexOf(l)) + 1;
                            if (r & 8) return n.length - 1;
                            throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last");
                        }(),
                        L = r & 32 ? {
                            preventScroll: true
                        } : {},
                        a = 0,
                        d = n.length,
                        u;
                    do {
                        if (a >= d || a + d <= 0) return 0;
                        var _s = p + a;
                        if (r & 16) _s = (_s + d) % d; else {
                            if (_s < 0) return 3;
                            if (_s >= d) return 1;
                        }
                        u = n[_s], u == null || u.focus(L), a += x;
                    } while (u !== i.activeElement);
                    return r & 6 && I(u) && u.select(), 2;
                }

                function t$3() {
                    return /iPhone/gi.test(window.navigator.platform) || /Mac/gi.test(window.navigator.platform) && window.navigator.maxTouchPoints > 0;
                }

                function i$2() {
                    return /Android/gi.test(window.navigator.userAgent);
                }

                function n$2() {
                    return t$3() || i$2();
                }

                function u$4(e, t, n) {
                    c$2.isServer || watchEffect(function (o) {
                        document.addEventListener(e, t, n), o(function () {
                            return document.removeEventListener(e, t, n);
                        });
                    });
                }

                function w$2(e, n, t) {
                    c$2.isServer || watchEffect(function (o) {
                        window.addEventListener(e, n, t), o(function () {
                            return window.removeEventListener(e, n, t);
                        });
                    });
                }

                function w$1(f, m) {
                    var l = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : computed(function () {
                        return true;
                    });

                    function a(e, r) {
                        if (!l.value || e.defaultPrevented) return;
                        var t = r(e);
                        if (t === null || !t.getRootNode().contains(t)) return;
                        var c = function o(n) {
                            return typeof n == "function" ? o(n()) : Array.isArray(n) || n instanceof Set ? n : [n];
                        }(f);
                        var _iterator3 = _createForOfIteratorHelper(c),
                            _step3;
                        try {
                            for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
                                var _o = _step3.value;
                                if (_o === null) continue;
                                var _n2 = _o instanceof HTMLElement ? _o : o$1(_o);
                                if (_n2 != null && _n2.contains(t) || e.composed && e.composedPath().includes(_n2)) return;
                            }
                        } catch (err) {
                            _iterator3.e(err);
                        } finally {
                            _iterator3.f();
                        }
                        return !w$3(t, h.Loose) && t.tabIndex !== -1 && e.preventDefault(), m(e, t);
                    }

                    var u = ref(null);
                    u$4("pointerdown", function (e) {
                        var r, t;
                        l.value && (u.value = ((t = (r = e.composedPath) == null ? void 0 : r.call(e)) == null ? void 0 : t[0]) || e.target);
                    }, true), u$4("mousedown", function (e) {
                        var r, t;
                        l.value && (u.value = ((t = (r = e.composedPath) == null ? void 0 : r.call(e)) == null ? void 0 : t[0]) || e.target);
                    }, true), u$4("click", function (e) {
                        n$2() || u.value && (a(e, function () {
                            return u.value;
                        }), u.value = null);
                    }, true), u$4("touchend", function (e) {
                        return a(e, function () {
                            return e.target instanceof HTMLElement ? e.target : null;
                        });
                    }, true), w$2("blur", function (e) {
                        return a(e, function () {
                            return window.document.activeElement instanceof HTMLIFrameElement ? window.document.activeElement : null;
                        });
                    }, true);
                }

                var N$2 = function (o) {
                        return o[o.None = 0] = "None", o[o.RenderStrategy = 1] = "RenderStrategy", o[o.Static = 2] = "Static", o;
                    }(N$2 || {}),
                    S = function (e) {
                        return e[e.Unmount = 0] = "Unmount", e[e.Hidden = 1] = "Hidden", e;
                    }(S || {});

                function A$2(_ref2) {
                    var _ref2$visible = _ref2.visible,
                        r = _ref2$visible === void 0 ? true : _ref2$visible,
                        _ref2$features = _ref2.features,
                        t = _ref2$features === void 0 ? 0 : _ref2$features,
                        e = _ref2.ourProps,
                        o = _ref2.theirProps,
                        i = _objectWithoutProperties(_ref2, _excluded);
                    var a;
                    var n = j(o, e),
                        l = Object.assign(i, {
                            props: n
                        });
                    if (r || t & 2 && n.static) return y$1(l);
                    if (t & 1) {
                        var _d = (a = n.unmount) == null || a ? 0 : 1;
                        return u$5(_d, _defineProperty(_defineProperty({}, 0, function _() {
                            return null;
                        }), 1, function _() {
                            return y$1(_objectSpread(_objectSpread({}, i), {}, {
                                props: _objectSpread(_objectSpread({}, n), {}, {
                                    hidden: true,
                                    style: {
                                        display: "none"
                                    }
                                })
                            }));
                        }));
                    }
                    return y$1(l);
                }

                function y$1(_ref3) {
                    var r = _ref3.props,
                        t = _ref3.attrs,
                        e = _ref3.slots,
                        o = _ref3.slot,
                        i = _ref3.name;
                    var m, h;
                    var _T$ = T$1(r, ["unmount", "static"]),
                        n = _T$.as,
                        l = _objectWithoutProperties(_T$, _excluded2),
                        a = (m = e.default) == null ? void 0 : m.call(e, o),
                        d = {};
                    if (o) {
                        var _u = false,
                            _c = [];
                        for (var _i = 0, _Object$entries = Object.entries(o); _i < _Object$entries.length; _i++) {
                            var _Object$entries$_i = _slicedToArray(_Object$entries[_i], 2),
                                p = _Object$entries$_i[0],
                                _f = _Object$entries$_i[1];
                            typeof _f == "boolean" && (_u = true), _f === true && _c.push(p);
                        }
                        _u && (d["data-headlessui-state"] = _c.join(" "));
                    }
                    if (n === "template") {
                        if (a = b(a != null ? a : []), Object.keys(l).length > 0 || Object.keys(t).length > 0) {
                            var _ref4 = a != null ? a : [],
                                _ref5 = _toArray(_ref4),
                                _u2 = _ref5[0],
                                _c2 = _ref5.slice(1);
                            if (!v(_u2) || _c2.length > 0) throw new Error(['Passing props on "template"!', "", "The current component <".concat(i, " /> is rendering a \"template\"."), "However we need to passthrough the following props:", Object.keys(l).concat(Object.keys(t)).map(function (s) {
                                return s.trim();
                            }).filter(function (s, g, R) {
                                return R.indexOf(s) === g;
                            }).sort(function (s, g) {
                                return s.localeCompare(g);
                            }).map(function (s) {
                                return "  - ".concat(s);
                            }).join("\n"), "", "You can apply a few solutions:", ['Add an `as="..."` prop, to ensure that we render an actual element instead of a "template".', "Render a single element as the child so that we can forward the props onto that element."].map(function (s) {
                                return "  - ".concat(s);
                            }).join("\n")].join("\n"));
                            var _p = j((h = _u2.props) != null ? h : {}, l, d),
                                _f2 = cloneVNode(_u2, _p, true);
                            for (var _s2 in _p) _s2.startsWith("on") && (_f2.props || (_f2.props = {}), _f2.props[_s2] = _p[_s2]);
                            return _f2;
                        }
                        return Array.isArray(a) && a.length === 1 ? a[0] : a;
                    }
                    return h$1(n, Object.assign({}, l, d), {
                        default: function _default() {
                            return a;
                        }
                    });
                }

                function b(r) {
                    return r.flatMap(function (t) {
                        return t.type === Fragment ? b(t.children) : [t];
                    });
                }

                function j() {
                    for (var _len4 = arguments.length, r = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
                        r[_key4] = arguments[_key4];
                    }
                    if (r.length === 0) return {};
                    if (r.length === 1) return r[0];
                    var t = {},
                        e = {};
                    for (var _i2 = 0, _r2 = r; _i2 < _r2.length; _i2++) {
                        var _i3 = _r2[_i2];
                        for (var _n3 in _i3) _n3.startsWith("on") && typeof _i3[_n3] == "function" ? (e[_n3] != null || (e[_n3] = []), e[_n3].push(_i3[_n3])) : t[_n3] = _i3[_n3];
                    }
                    if (t.disabled || t["aria-disabled"]) return Object.assign(t, Object.fromEntries(Object.keys(e).map(function (i) {
                        return [i, void 0];
                    })));
                    var _loop = function _loop(_i4) {
                        Object.assign(t, _defineProperty({}, _i4, function (n) {
                            var a = e[_i4];
                            for (var _len5 = arguments.length, l = new Array(_len5 > 1 ? _len5 - 1 : 0), _key5 = 1; _key5 < _len5; _key5++) {
                                l[_key5 - 1] = arguments[_key5];
                            }
                            var _iterator4 = _createForOfIteratorHelper(a),
                                _step4;
                            try {
                                for (_iterator4.s(); !(_step4 = _iterator4.n()).done;) {
                                    var _d2 = _step4.value;
                                    if (n instanceof Event && n.defaultPrevented) return;
                                    _d2.apply(void 0, [n].concat(l));
                                }
                            } catch (err) {
                                _iterator4.e(err);
                            } finally {
                                _iterator4.f();
                            }
                        }));
                    };
                    for (var _i4 in e) {
                        _loop(_i4);
                    }
                    return t;
                }

                function T$1(r) {
                    var t = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
                    var e = Object.assign({}, r);
                    var _iterator5 = _createForOfIteratorHelper(t),
                        _step5;
                    try {
                        for (_iterator5.s(); !(_step5 = _iterator5.n()).done;) {
                            var _o2 = _step5.value;
                            _o2 in e && delete e[_o2];
                        }
                    } catch (err) {
                        _iterator5.e(err);
                    } finally {
                        _iterator5.f();
                    }
                    return e;
                }

                function v(r) {
                    return r == null ? false : typeof r.type == "string" || _typeof(r.type) == "object" || typeof r.type == "function";
                }

                var u$3 = function (e) {
                    return e[e.None = 1] = "None", e[e.Focusable = 2] = "Focusable", e[e.Hidden = 4] = "Hidden", e;
                }(u$3 || {});
                var f$1 = defineComponent({
                    name: "Hidden",
                    props: {
                        as: {
                            type: [Object, String],
                            default: "div"
                        },
                        features: {
                            type: Number,
                            default: 1
                        }
                    },
                    setup: function setup(t, _ref6) {
                        var n = _ref6.slots,
                            i = _ref6.attrs;
                        return function () {
                            var r;
                            var e = t.features,
                                d = _objectWithoutProperties(t, _excluded3),
                                o = {
                                    "aria-hidden": (e & 2) === 2 ? true : (r = d["aria-hidden"]) != null ? r : void 0,
                                    hidden: (e & 4) === 4 ? true : void 0,
                                    style: _objectSpread({
                                        position: "fixed",
                                        top: 1,
                                        left: 1,
                                        width: 1,
                                        height: 0,
                                        padding: 0,
                                        margin: -1,
                                        overflow: "hidden",
                                        clip: "rect(0, 0, 0, 0)",
                                        whiteSpace: "nowrap",
                                        borderWidth: "0"
                                    }, (e & 4) === 4 && (e & 2) !== 2 && {
                                        display: "none"
                                    })
                                };
                            return A$2({
                                ourProps: o,
                                theirProps: d,
                                slot: {},
                                attrs: i,
                                slots: n,
                                name: "Hidden"
                            });
                        };
                    }
                });
                var n$1 = Symbol("Context");
                var i$1 = function (e) {
                    return e[e.Open = 1] = "Open", e[e.Closed = 2] = "Closed", e[e.Closing = 4] = "Closing", e[e.Opening = 8] = "Opening", e;
                }(i$1 || {});

                function l$1() {
                    return inject(n$1, null);
                }

                var o = function (r) {
                    return r.Space = " ", r.Enter = "Enter", r.Escape = "Escape", r.Backspace = "Backspace", r.Delete = "Delete", r.ArrowLeft = "ArrowLeft", r.ArrowUp = "ArrowUp", r.ArrowRight = "ArrowRight", r.ArrowDown = "ArrowDown", r.Home = "Home", r.End = "End", r.PageUp = "PageUp", r.PageDown = "PageDown", r.Tab = "Tab", r;
                }(o || {});

                function t$2(n) {
                    function e() {
                        document.readyState !== "loading" && (n(), document.removeEventListener("DOMContentLoaded", e));
                    }

                    typeof window != "undefined" && typeof document != "undefined" && (document.addEventListener("DOMContentLoaded", e), e());
                }

                var t$1 = [];
                t$2(function () {
                    function e(n) {
                        n.target instanceof HTMLElement && n.target !== document.body && t$1[0] !== n.target && (t$1.unshift(n.target), t$1 = t$1.filter(function (r) {
                            return r != null && r.isConnected;
                        }), t$1.splice(10));
                    }

                    window.addEventListener("click", e, {
                        capture: true
                    }), window.addEventListener("mousedown", e, {
                        capture: true
                    }), window.addEventListener("focus", e, {
                        capture: true
                    }), document.body.addEventListener("click", e, {
                        capture: true
                    }), document.body.addEventListener("mousedown", e, {
                        capture: true
                    }), document.body.addEventListener("focus", e, {
                        capture: true
                    });
                });

                function E$1(n, e, o, r) {
                    c$2.isServer || watchEffect(function (t) {
                        n = n != null ? n : window, n.addEventListener(e, o, r), t(function () {
                            return n.removeEventListener(e, o, r);
                        });
                    });
                }

                var d$2 = function (r) {
                    return r[r.Forwards = 0] = "Forwards", r[r.Backwards = 1] = "Backwards", r;
                }(d$2 || {});

                function n() {
                    var o = ref(0);
                    return w$2("keydown", function (e) {
                        e.key === "Tab" && (o.value = e.shiftKey ? 1 : 0);
                    }), o;
                }

                function B(t) {
                    if (!t) return new Set();
                    if (typeof t == "function") return new Set(t());
                    var n = new Set();
                    var _iterator6 = _createForOfIteratorHelper(t.value),
                        _step6;
                    try {
                        for (_iterator6.s(); !(_step6 = _iterator6.n()).done;) {
                            var _r3 = _step6.value;
                            var _l = o$1(_r3);
                            _l instanceof HTMLElement && n.add(_l);
                        }
                    } catch (err) {
                        _iterator6.e(err);
                    } finally {
                        _iterator6.f();
                    }
                    return n;
                }

                var A$1 = function (e) {
                    return e[e.None = 1] = "None", e[e.InitialFocus = 2] = "InitialFocus", e[e.TabLock = 4] = "TabLock", e[e.FocusLock = 8] = "FocusLock", e[e.RestoreFocus = 16] = "RestoreFocus", e[e.All = 30] = "All", e;
                }(A$1 || {});
                var ue = Object.assign(defineComponent({
                    name: "FocusTrap",
                    props: {
                        as: {
                            type: [Object, String],
                            default: "div"
                        },
                        initialFocus: {
                            type: Object,
                            default: null
                        },
                        features: {
                            type: Number,
                            default: 30
                        },
                        containers: {
                            type: [Object, Function],
                            default: ref(new Set())
                        }
                    },
                    inheritAttrs: false,
                    setup: function setup(t, _ref7) {
                        var n$1 = _ref7.attrs,
                            r = _ref7.slots,
                            l = _ref7.expose;
                        var o = ref(null);
                        l({
                            el: o,
                            $el: o
                        });
                        var i = computed(function () {
                                return i$3(o);
                            }),
                            e = ref(false);
                        onMounted(function () {
                            return e.value = true;
                        }), onUnmounted(function () {
                            return e.value = false;
                        }), $$1({
                            ownerDocument: i
                        }, computed(function () {
                            return e.value && Boolean(t.features & 16);
                        }));
                        var m = z$1({
                            ownerDocument: i,
                            container: o,
                            initialFocus: computed(function () {
                                return t.initialFocus;
                            })
                        }, computed(function () {
                            return e.value && Boolean(t.features & 2);
                        }));
                        J({
                            ownerDocument: i,
                            container: o,
                            containers: t.containers,
                            previousActiveElement: m
                        }, computed(function () {
                            return e.value && Boolean(t.features & 8);
                        }));
                        var f = n();

                        function a(u) {
                            var T = o$1(o);
                            if (!T) return;
                            (function (w) {
                                return w();
                            })(function () {
                                u$5(f.value, _defineProperty(_defineProperty({}, d$2.Forwards, function () {
                                    P(T, N$3.First, {
                                        skipElements: [u.relatedTarget]
                                    });
                                }), d$2.Backwards, function () {
                                    P(T, N$3.Last, {
                                        skipElements: [u.relatedTarget]
                                    });
                                }));
                            });
                        }

                        var s = ref(false);

                        function F(u) {
                            u.key === "Tab" && (s.value = true, requestAnimationFrame(function () {
                                s.value = false;
                            }));
                        }

                        function H(u) {
                            if (!e.value) return;
                            var T = B(t.containers);
                            o$1(o) instanceof HTMLElement && T.add(o$1(o));
                            var d = u.relatedTarget;
                            d instanceof HTMLElement && d.dataset.headlessuiFocusGuard !== "true" && (N$1(T, d) || (s.value ? P(o$1(o), u$5(f.value, _defineProperty(_defineProperty({}, d$2.Forwards, function () {
                                return N$3.Next;
                            }), d$2.Backwards, function () {
                                return N$3.Previous;
                            })) | N$3.WrapAround, {
                                relativeTo: u.target
                            }) : u.target instanceof HTMLElement && S$1(u.target)));
                        }

                        return function () {
                            var u = {},
                                T = {
                                    ref: o,
                                    onKeydown: F,
                                    onFocusout: H
                                },
                                d = t.features,
                                w = t.initialFocus,
                                Q = t.containers,
                                O = _objectWithoutProperties(t, _excluded4);
                            return h$1(Fragment, [Boolean(d & 4) && h$1(f$1, {
                                as: "button",
                                type: "button",
                                "data-headlessui-focus-guard": true,
                                onFocus: a,
                                features: u$3.Focusable
                            }), A$2({
                                ourProps: T,
                                theirProps: _objectSpread(_objectSpread({}, n$1), O),
                                slot: u,
                                attrs: n$1,
                                slots: r,
                                name: "FocusTrap"
                            }), Boolean(d & 4) && h$1(f$1, {
                                as: "button",
                                type: "button",
                                "data-headlessui-focus-guard": true,
                                onFocus: a,
                                features: u$3.Focusable
                            })]);
                        };
                    }
                }), {
                    features: A$1
                });

                function W(t) {
                    var n = ref(t$1.slice());
                    return watch([t], function (_ref8, _ref9) {
                        var _ref10 = _slicedToArray(_ref8, 1),
                            r = _ref10[0];
                        var _ref11 = _slicedToArray(_ref9, 1),
                            l = _ref11[0];
                        l === true && r === false ? t$4(function () {
                            n.value.splice(0);
                        }) : l === false && r === true && (n.value = t$1.slice());
                    }, {
                        flush: "post"
                    }), function () {
                        var r;
                        return (r = n.value.find(function (l) {
                            return l != null && l.isConnected;
                        })) != null ? r : null;
                    };
                }

                function $$1(_ref12, n) {
                    var t = _ref12.ownerDocument;
                    var r = W(n);
                    onMounted(function () {
                        watchEffect(function () {
                            var l, o;
                            n.value || ((l = t.value) == null ? void 0 : l.activeElement) === ((o = t.value) == null ? void 0 : o.body) && S$1(r());
                        }, {
                            flush: "post"
                        });
                    }), onUnmounted(function () {
                        n.value && S$1(r());
                    });
                }

                function z$1(_ref13, l) {
                    var t = _ref13.ownerDocument,
                        n = _ref13.container,
                        r = _ref13.initialFocus;
                    var o = ref(null),
                        i = ref(false);
                    return onMounted(function () {
                        return i.value = true;
                    }), onUnmounted(function () {
                        return i.value = false;
                    }), onMounted(function () {
                        watch([n, r, l], function (e, m) {
                            if (e.every(function (a, s) {
                                return (m == null ? void 0 : m[s]) === a;
                            }) || !l.value) return;
                            var f = o$1(n);
                            f && t$4(function () {
                                var F, H;
                                if (!i.value) return;
                                var a = o$1(r),
                                    s = (F = t.value) == null ? void 0 : F.activeElement;
                                if (a) {
                                    if (a === s) {
                                        o.value = s;
                                        return;
                                    }
                                } else if (f.contains(s)) {
                                    o.value = s;
                                    return;
                                }
                                a ? S$1(a) : P(f, N$3.First | N$3.NoScroll) === T$2.Error && console.warn("There are no focusable elements inside the <FocusTrap />"), o.value = (H = t.value) == null ? void 0 : H.activeElement;
                            });
                        }, {
                            immediate: true,
                            flush: "post"
                        });
                    }), o;
                }

                function J(_ref14, o) {
                    var t = _ref14.ownerDocument,
                        n = _ref14.container,
                        r = _ref14.containers,
                        l = _ref14.previousActiveElement;
                    var i;
                    E$1((i = t.value) == null ? void 0 : i.defaultView, "focus", function (e) {
                        if (!o.value) return;
                        var m = B(r);
                        o$1(n) instanceof HTMLElement && m.add(o$1(n));
                        var f = l.value;
                        if (!f) return;
                        var a = e.target;
                        a && a instanceof HTMLElement ? N$1(m, a) ? (l.value = a, S$1(a)) : (e.preventDefault(), e.stopPropagation(), S$1(f)) : S$1(l.value);
                    }, true);
                }

                function N$1(t, n) {
                    var _iterator7 = _createForOfIteratorHelper(t),
                        _step7;
                    try {
                        for (_iterator7.s(); !(_step7 = _iterator7.n()).done;) {
                            var _r4 = _step7.value;
                            if (_r4.contains(n)) return true;
                        }
                    } catch (err) {
                        _iterator7.e(err);
                    } finally {
                        _iterator7.f();
                    }
                    return false;
                }

                function m$1(t) {
                    var e = shallowRef(t.getSnapshot());
                    return onUnmounted(t.subscribe(function () {
                        e.value = t.getSnapshot();
                    })), e;
                }

                function a$1(o, r) {
                    var t = o(),
                        n = new Set();
                    return {
                        getSnapshot: function getSnapshot() {
                            return t;
                        },
                        subscribe: function subscribe(e) {
                            return n.add(e), function () {
                                return n.delete(e);
                            };
                        },
                        dispatch: function dispatch(e) {
                            var _r$e;
                            for (var _len6 = arguments.length, s = new Array(_len6 > 1 ? _len6 - 1 : 0), _key6 = 1; _key6 < _len6; _key6++) {
                                s[_key6 - 1] = arguments[_key6];
                            }
                            var i = (_r$e = r[e]).call.apply(_r$e, [t].concat(s));
                            i && (t = i, n.forEach(function (c) {
                                return c();
                            }));
                        }
                    };
                }

                function c() {
                    var o;
                    return {
                        before: function before(_ref15) {
                            var e = _ref15.doc;
                            var l;
                            var n = e.documentElement;
                            o = ((l = e.defaultView) != null ? l : window).innerWidth - n.clientWidth;
                        },
                        after: function after(_ref16) {
                            var e = _ref16.doc,
                                n = _ref16.d;
                            var t = e.documentElement,
                                l = t.clientWidth - t.offsetWidth,
                                r = o - l;
                            n.style(t, "paddingRight", "".concat(r, "px"));
                        }
                    };
                }

                function w() {
                    return t$3() ? {
                        before: function before(_ref17) {
                            var r = _ref17.doc,
                                n = _ref17.d,
                                c = _ref17.meta;

                            function a(o) {
                                return c.containers.flatMap(function (l) {
                                    return l();
                                }).some(function (l) {
                                    return l.contains(o);
                                });
                            }

                            n.microTask(function () {
                                var s;
                                if (window.getComputedStyle(r.documentElement).scrollBehavior !== "auto") {
                                    var _t = o$3();
                                    _t.style(r.documentElement, "scrollBehavior", "auto"), n.add(function () {
                                        return n.microTask(function () {
                                            return _t.dispose();
                                        });
                                    });
                                }
                                var o = (s = window.scrollY) != null ? s : window.pageYOffset,
                                    l = null;
                                n.addEventListener(r, "click", function (t) {
                                    if (t.target instanceof HTMLElement) try {
                                        var _e3 = t.target.closest("a");
                                        if (!_e3) return;
                                        var _URL = new URL(_e3.href),
                                            _f3 = _URL.hash,
                                            _i5 = r.querySelector(_f3);
                                        _i5 && !a(_i5) && (l = _i5);
                                    } catch (_unused) {
                                    }
                                }, true), n.addEventListener(r, "touchstart", function (t) {
                                    if (t.target instanceof HTMLElement) if (a(t.target)) {
                                        var _e4 = t.target;
                                        for (; _e4.parentElement && a(_e4.parentElement);) _e4 = _e4.parentElement;
                                        n.style(_e4, "overscrollBehavior", "contain");
                                    } else n.style(t.target, "touchAction", "none");
                                }), n.addEventListener(r, "touchmove", function (t) {
                                    if (t.target instanceof HTMLElement) {
                                        if (t.target.tagName === "INPUT") return;
                                        if (a(t.target)) {
                                            var _e5 = t.target;
                                            for (; _e5.parentElement && _e5.dataset.headlessuiPortal !== "" && !(_e5.scrollHeight > _e5.clientHeight || _e5.scrollWidth > _e5.clientWidth);) _e5 = _e5.parentElement;
                                            _e5.dataset.headlessuiPortal === "" && t.preventDefault();
                                        } else t.preventDefault();
                                    }
                                }, {
                                    passive: false
                                }), n.add(function () {
                                    var e;
                                    var t = (e = window.scrollY) != null ? e : window.pageYOffset;
                                    o !== t && window.scrollTo(0, o), l && l.isConnected && (l.scrollIntoView({
                                        block: "nearest"
                                    }), l = null);
                                });
                            });
                        }
                    } : {};
                }

                function l() {
                    return {
                        before: function before(_ref18) {
                            var e = _ref18.doc,
                                o = _ref18.d;
                            o.style(e.documentElement, "overflow", "hidden");
                        }
                    };
                }

                function m(e) {
                    var n = {};
                    var _iterator8 = _createForOfIteratorHelper(e),
                        _step8;
                    try {
                        for (_iterator8.s(); !(_step8 = _iterator8.n()).done;) {
                            var _t2 = _step8.value;
                            Object.assign(n, _t2(n));
                        }
                    } catch (err) {
                        _iterator8.e(err);
                    } finally {
                        _iterator8.f();
                    }
                    return n;
                }

                var a = a$1(function () {
                    return new Map();
                }, {
                    PUSH: function PUSH(e, n) {
                        var o;
                        var t = (o = this.get(e)) != null ? o : {
                            doc: e,
                            count: 0,
                            d: o$3(),
                            meta: new Set()
                        };
                        return t.count++, t.meta.add(n), this.set(e, t), this;
                    },
                    POP: function POP(e, n) {
                        var t = this.get(e);
                        return t && (t.count--, t.meta.delete(n)), this;
                    },
                    SCROLL_PREVENT: function SCROLL_PREVENT(_ref19) {
                        var e = _ref19.doc,
                            n = _ref19.d,
                            t = _ref19.meta;
                        var o = {
                                doc: e,
                                d: n,
                                meta: m(t)
                            },
                            c$1 = [w(), c(), l()];
                        c$1.forEach(function (_ref20) {
                            var r = _ref20.before;
                            return r == null ? void 0 : r(o);
                        }), c$1.forEach(function (_ref21) {
                            var r = _ref21.after;
                            return r == null ? void 0 : r(o);
                        });
                    },
                    SCROLL_ALLOW: function SCROLL_ALLOW(_ref22) {
                        var e = _ref22.d;
                        e.dispose();
                    },
                    TEARDOWN: function TEARDOWN(_ref23) {
                        var e = _ref23.doc;
                        this.delete(e);
                    }
                });
                a.subscribe(function () {
                    var e = a.getSnapshot(),
                        n = new Map();
                    var _iterator9 = _createForOfIteratorHelper(e),
                        _step9;
                    try {
                        for (_iterator9.s(); !(_step9 = _iterator9.n()).done;) {
                            var _step9$value = _slicedToArray(_step9.value, 1),
                                _t3 = _step9$value[0];
                            n.set(_t3, _t3.documentElement.style.overflow);
                        }
                    } catch (err) {
                        _iterator9.e(err);
                    } finally {
                        _iterator9.f();
                    }
                    var _iterator10 = _createForOfIteratorHelper(e.values()),
                        _step10;
                    try {
                        for (_iterator10.s(); !(_step10 = _iterator10.n()).done;) {
                            var _t4 = _step10.value;
                            var _o3 = n.get(_t4.doc) === "hidden",
                                _c3 = _t4.count !== 0;
                            (_c3 && !_o3 || !_c3 && _o3) && a.dispatch(_t4.count > 0 ? "SCROLL_PREVENT" : "SCROLL_ALLOW", _t4), _t4.count === 0 && a.dispatch("TEARDOWN", _t4);
                        }
                    } catch (err) {
                        _iterator10.e(err);
                    } finally {
                        _iterator10.f();
                    }
                });

                function d$1(t, a$1, n) {
                    var i = m$1(a),
                        l = computed(function () {
                            var e = t.value ? i.value.get(t.value) : void 0;
                            return e ? e.count > 0 : false;
                        });
                    return watch([t, a$1], function (_ref24, _ref25, o) {
                        var _ref26 = _slicedToArray(_ref24, 2),
                            e = _ref26[0],
                            m = _ref26[1];
                        var _ref27 = _slicedToArray(_ref25, 1),
                            r = _ref27[0];
                        if (!e || !m) return;
                        a.dispatch("PUSH", e, n);
                        var f = false;
                        o(function () {
                            f || (a.dispatch("POP", r != null ? r : e, n), f = true);
                        });
                    }, {
                        immediate: true
                    }), l;
                }

                var i = new Map(),
                    t = new Map();

                function E(d) {
                    var f = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : ref(true);
                    watchEffect(function (o) {
                        var a;
                        if (!f.value) return;
                        var e = o$1(d);
                        if (!e) return;
                        o(function () {
                            var u;
                            if (!e) return;
                            var r = (u = t.get(e)) != null ? u : 1;
                            if (r === 1 ? t.delete(e) : t.set(e, r - 1), r !== 1) return;
                            var n = i.get(e);
                            n && (n["aria-hidden"] === null ? e.removeAttribute("aria-hidden") : e.setAttribute("aria-hidden", n["aria-hidden"]), e.inert = n.inert, i.delete(e));
                        });
                        var l = (a = t.get(e)) != null ? a : 0;
                        t.set(e, l + 1), l === 0 && (i.set(e, {
                            "aria-hidden": e.getAttribute("aria-hidden"),
                            inert: e.inert
                        }), e.setAttribute("aria-hidden", "true"), e.inert = true);
                    });
                }

                function N() {
                    var _ref28 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
                        _ref28$defaultContain = _ref28.defaultContainers,
                        o = _ref28$defaultContain === void 0 ? [] : _ref28$defaultContain,
                        i = _ref28.portals,
                        H = _ref28.mainTreeNodeRef;
                    var t = ref(null),
                        r = i$3(t);

                    function u() {
                        var l, f, a;
                        var n = [];
                        var _iterator11 = _createForOfIteratorHelper(o),
                            _step11;
                        try {
                            for (_iterator11.s(); !(_step11 = _iterator11.n()).done;) {
                                var _e7 = _step11.value;
                                _e7 !== null && (_e7 instanceof HTMLElement ? n.push(_e7) : "value" in _e7 && _e7.value instanceof HTMLElement && n.push(_e7.value));
                            }
                        } catch (err) {
                            _iterator11.e(err);
                        } finally {
                            _iterator11.f();
                        }
                        if (i != null && i.value) {
                            var _iterator12 = _createForOfIteratorHelper(i.value),
                                _step12;
                            try {
                                for (_iterator12.s(); !(_step12 = _iterator12.n()).done;) {
                                    var _e6 = _step12.value;
                                    n.push(_e6);
                                }
                            } catch (err) {
                                _iterator12.e(err);
                            } finally {
                                _iterator12.f();
                            }
                        }
                        var _iterator13 = _createForOfIteratorHelper((l = r == null ? void 0 : r.querySelectorAll("html > *, body > *")) != null ? l : []),
                            _step13;
                        try {
                            var _loop2 = function _loop2() {
                                var e = _step13.value;
                                e !== document.body && e !== document.head && e instanceof HTMLElement && e.id !== "headlessui-portal-root" && (e.contains(o$1(t)) || e.contains((a = (f = o$1(t)) == null ? void 0 : f.getRootNode()) == null ? void 0 : a.host) || n.some(function (M) {
                                    return e.contains(M);
                                }) || n.push(e));
                            };
                            for (_iterator13.s(); !(_step13 = _iterator13.n()).done;) {
                                _loop2();
                            }
                        } catch (err) {
                            _iterator13.e(err);
                        } finally {
                            _iterator13.f();
                        }
                        return n;
                    }

                    return {
                        resolveContainers: u,
                        contains: function contains(n) {
                            return u().some(function (l) {
                                return l.contains(n);
                            });
                        },
                        mainTreeNodeRef: t,
                        MainTreeNode: function MainTreeNode() {
                            return H != null ? null : h$1(f$1, {
                                features: u$3.Hidden,
                                ref: t
                            });
                        }
                    };
                }

                var e = Symbol("ForcePortalRootContext");

                function s$1() {
                    return inject(e, false);
                }

                var u$2 = defineComponent({
                    name: "ForcePortalRoot",
                    props: {
                        as: {
                            type: [Object, String],
                            default: "template"
                        },
                        force: {
                            type: Boolean,
                            default: false
                        }
                    },
                    setup: function setup(o, _ref29) {
                        var t = _ref29.slots,
                            r = _ref29.attrs;
                        return provide(e, o.force), function () {
                            var f = o.force,
                                n = _objectWithoutProperties(o, _excluded5);
                            return A$2({
                                theirProps: n,
                                ourProps: {},
                                slot: {},
                                slots: t,
                                attrs: r,
                                name: "ForcePortalRoot"
                            });
                        };
                    }
                });
                var u$1 = Symbol("StackContext");
                var s = function (e) {
                    return e[e.Add = 0] = "Add", e[e.Remove = 1] = "Remove", e;
                }(s || {});

                function y() {
                    return inject(u$1, function () {
                    });
                }

                function R(_ref30) {
                    var o = _ref30.type,
                        r = _ref30.enabled,
                        e = _ref30.element,
                        i = _ref30.onUpdate;
                    var a = y();

                    function t() {
                        i == null || i.apply(void 0, arguments), a.apply(void 0, arguments);
                    }

                    onMounted(function () {
                        watch(r, function (n, d) {
                            n ? t(0, o, e) : d === true && t(1, o, e);
                        }, {
                            immediate: true,
                            flush: "sync"
                        });
                    }), onUnmounted(function () {
                        r.value && t(1, o, e);
                    }), provide(u$1, t);
                }

                var u = Symbol("DescriptionContext");

                function k() {
                    var _ref31 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
                        _ref31$slot = _ref31.slot,
                        t = _ref31$slot === void 0 ? ref({}) : _ref31$slot,
                        _ref31$name = _ref31.name,
                        o = _ref31$name === void 0 ? "Description" : _ref31$name,
                        _ref31$props = _ref31.props,
                        s = _ref31$props === void 0 ? {} : _ref31$props;
                    var e = ref([]);

                    function r(n) {
                        return e.value.push(n), function () {
                            var i = e.value.indexOf(n);
                            i !== -1 && e.value.splice(i, 1);
                        };
                    }

                    return provide(u, {
                        register: r,
                        slot: t,
                        name: o,
                        props: s
                    }), computed(function () {
                        return e.value.length > 0 ? e.value.join(" ") : void 0;
                    });
                }

                function x(e) {
                    var t = i$3(e);
                    if (!t) {
                        if (e === null) return null;
                        throw new Error("[Headless UI]: Cannot find ownerDocument for contextElement: ".concat(e));
                    }
                    var l = t.getElementById("headlessui-portal-root");
                    if (l) return l;
                    var r = t.createElement("div");
                    return r.setAttribute("id", "headlessui-portal-root"), t.body.appendChild(r);
                }

                var f = new WeakMap();

                function U(e) {
                    var t;
                    return (t = f.get(e)) != null ? t : 0;
                }

                function M(e, t) {
                    var l = t(U(e));
                    return l <= 0 ? f.delete(e) : f.set(e, l), l;
                }

                var $ = defineComponent({
                        name: "Portal",
                        props: {
                            as: {
                                type: [Object, String],
                                default: "div"
                            }
                        },
                        setup: function setup(e, _ref32) {
                            var t = _ref32.slots,
                                l = _ref32.attrs;
                            var r = ref(null),
                                i = computed(function () {
                                    return i$3(r);
                                }),
                                o = s$1(),
                                u = inject(H$1, null),
                                n = ref(o === true || u == null ? x(r.value) : u.resolveTarget());
                            n.value && M(n.value, function (a) {
                                return a + 1;
                            });
                            var c = ref(false);
                            onMounted(function () {
                                c.value = true;
                            }), watchEffect(function () {
                                o || u != null && (n.value = u.resolveTarget());
                            });
                            var v = inject(d, null),
                                g = false,
                                b = getCurrentInstance();
                            return watch(r, function () {
                                if (g || !v) return;
                                var a = o$1(r);
                                a && (onUnmounted(v.register(a), b), g = true);
                            }), onUnmounted(function () {
                                var P, T;
                                var a = (P = i.value) == null ? void 0 : P.getElementById("headlessui-portal-root");
                                !a || n.value !== a || M(n.value, function (L) {
                                    return L - 1;
                                }) || n.value.children.length > 0 || (T = n.value.parentElement) == null || T.removeChild(n.value);
                            }), function () {
                                if (!c.value || n.value === null) return null;
                                var a = {
                                    ref: r,
                                    "data-headlessui-portal": ""
                                };
                                return h$1(Teleport, {
                                    to: n.value
                                }, A$2({
                                    ourProps: a,
                                    theirProps: e,
                                    slot: {},
                                    attrs: l,
                                    slots: t,
                                    name: "Portal"
                                }));
                            };
                        }
                    }),
                    d = Symbol("PortalParentContext");

                function q() {
                    var e = inject(d, null),
                        t = ref([]);

                    function l(o) {
                        return t.value.push(o), e && e.register(o), function () {
                            return r(o);
                        };
                    }

                    function r(o) {
                        var u = t.value.indexOf(o);
                        u !== -1 && t.value.splice(u, 1), e && e.unregister(o);
                    }

                    var i = {
                        register: l,
                        unregister: r,
                        portals: t
                    };
                    return [t, defineComponent({
                        name: "PortalWrapper",
                        setup: function setup(o, _ref33) {
                            var u = _ref33.slots;
                            return provide(d, i), function () {
                                var n;
                                return (n = u.default) == null ? void 0 : n.call(u);
                            };
                        }
                    })];
                }

                var H$1 = Symbol("PortalGroupContext"),
                    z = defineComponent({
                        name: "PortalGroup",
                        props: {
                            as: {
                                type: [Object, String],
                                default: "template"
                            },
                            target: {
                                type: Object,
                                default: null
                            }
                        },
                        setup: function setup(e, _ref34) {
                            var t = _ref34.attrs,
                                l = _ref34.slots;
                            var r = reactive({
                                resolveTarget: function resolveTarget() {
                                    return e.target;
                                }
                            });
                            return provide(H$1, r), function () {
                                var i = e.target,
                                    o = _objectWithoutProperties(e, _excluded6);
                                return A$2({
                                    theirProps: o,
                                    ourProps: {},
                                    slot: {},
                                    attrs: t,
                                    slots: l,
                                    name: "PortalGroup"
                                });
                            };
                        }
                    });
                var Te = function (l) {
                    return l[l.Open = 0] = "Open", l[l.Closed = 1] = "Closed", l;
                }(Te || {});
                var H = Symbol("DialogContext");

                function T(t) {
                    var i = inject(H, null);
                    if (i === null) {
                        var _l2 = new Error("<".concat(t, " /> is missing a parent <Dialog /> component."));
                        throw Error.captureStackTrace && Error.captureStackTrace(_l2, T), _l2;
                    }
                    return i;
                }

                var A = "DC8F892D-2EBD-447C-A4C8-A03058436FF4",
                    Ye = defineComponent({
                        name: "Dialog",
                        inheritAttrs: false,
                        props: {
                            as: {
                                type: [Object, String],
                                default: "div"
                            },
                            static: {
                                type: Boolean,
                                default: false
                            },
                            unmount: {
                                type: Boolean,
                                default: true
                            },
                            open: {
                                type: [Boolean, String],
                                default: A
                            },
                            initialFocus: {
                                type: Object,
                                default: null
                            },
                            id: {
                                type: String,
                                default: null
                            },
                            role: {
                                type: String,
                                default: "dialog"
                            }
                        },
                        emits: {
                            close: function close(t) {
                                return true;
                            }
                        },
                        setup: function setup(t, _ref35) {
                            var i = _ref35.emit,
                                l = _ref35.attrs,
                                p = _ref35.slots,
                                s$1 = _ref35.expose;
                            var q$1, W;
                            var n = (q$1 = t.id) != null ? q$1 : "headlessui-dialog-".concat(i$5()),
                                u = ref(false);
                            onMounted(function () {
                                u.value = true;
                            });
                            var r = false,
                                g = computed(function () {
                                    return t.role === "dialog" || t.role === "alertdialog" ? t.role : (r || (r = true, console.warn("Invalid role [".concat(g, "] passed to <Dialog />. Only `dialog` and and `alertdialog` are supported. Using `dialog` instead."))), "dialog");
                                }),
                                D = ref(0),
                                S = l$1(),
                                R$1 = computed(function () {
                                    return t.open === A && S !== null ? (S.value & i$1.Open) === i$1.Open : t.open;
                                }),
                                m = ref(null),
                                E$2 = computed(function () {
                                    return i$3(m);
                                });
                            if (s$1({
                                el: m,
                                $el: m
                            }), !(t.open !== A || S !== null)) throw new Error("You forgot to provide an `open` prop to the `Dialog`.");
                            if (typeof R$1.value != "boolean") throw new Error("You provided an `open` prop to the `Dialog`, but the value is not a boolean. Received: ".concat(R$1.value === A ? void 0 : t.open));
                            var c = computed(function () {
                                    return u.value && R$1.value ? 0 : 1;
                                }),
                                k$1 = computed(function () {
                                    return c.value === 0;
                                }),
                                w = computed(function () {
                                    return D.value > 1;
                                }),
                                N$1 = inject(H, null) !== null,
                                _q = q(),
                                _q2 = _slicedToArray(_q, 2),
                                Q = _q2[0],
                                X = _q2[1],
                                _N = N({
                                    portals: Q,
                                    defaultContainers: [computed(function () {
                                        var e;
                                        return (e = h.panelRef.value) != null ? e : m.value;
                                    })]
                                }),
                                B = _N.resolveContainers,
                                K = _N.mainTreeNodeRef,
                                Z = _N.MainTreeNode,
                                ee = computed(function () {
                                    return w.value ? "parent" : "leaf";
                                }),
                                U = computed(function () {
                                    return S !== null ? (S.value & i$1.Closing) === i$1.Closing : false;
                                }),
                                te = computed(function () {
                                    return N$1 || U.value ? false : k$1.value;
                                }),
                                le = computed(function () {
                                    var e, a, d;
                                    return (d = Array.from((a = (e = E$2.value) == null ? void 0 : e.querySelectorAll("body > *")) != null ? a : []).find(function (f) {
                                        return f.id === "headlessui-portal-root" ? false : f.contains(o$1(K)) && f instanceof HTMLElement;
                                    })) != null ? d : null;
                                });
                            E(le, te);
                            var ae = computed(function () {
                                    return w.value ? true : k$1.value;
                                }),
                                oe = computed(function () {
                                    var e, a, d;
                                    return (d = Array.from((a = (e = E$2.value) == null ? void 0 : e.querySelectorAll("[data-headlessui-portal]")) != null ? a : []).find(function (f) {
                                        return f.contains(o$1(K)) && f instanceof HTMLElement;
                                    })) != null ? d : null;
                                });
                            E(oe, ae), R({
                                type: "Dialog",
                                enabled: computed(function () {
                                    return c.value === 0;
                                }),
                                element: m,
                                onUpdate: function onUpdate(e, a) {
                                    if (a === "Dialog") return u$5(e, _defineProperty(_defineProperty({}, s.Add, function () {
                                        return D.value += 1;
                                    }), s.Remove, function () {
                                        return D.value -= 1;
                                    }));
                                }
                            });
                            var re = k({
                                    name: "DialogDescription",
                                    slot: computed(function () {
                                        return {
                                            open: R$1.value
                                        };
                                    })
                                }),
                                M = ref(null),
                                h = {
                                    titleId: M,
                                    panelRef: ref(null),
                                    dialogState: c,
                                    setTitleId: function setTitleId(e) {
                                        M.value !== e && (M.value = e);
                                    },
                                    close: function close() {
                                        i("close", false);
                                    }
                                };
                            provide(H, h);
                            var ne = computed(function () {
                                return !(!k$1.value || w.value);
                            });
                            w$1(B, function (e, a) {
                                e.preventDefault(), h.close(), nextTick(function () {
                                    return a == null ? void 0 : a.focus();
                                });
                            }, ne);
                            var ie = computed(function () {
                                return !(w.value || c.value !== 0);
                            });
                            E$1((W = E$2.value) == null ? void 0 : W.defaultView, "keydown", function (e) {
                                ie.value && (e.defaultPrevented || e.key === o.Escape && (e.preventDefault(), e.stopPropagation(), h.close()));
                            });
                            var ue$1 = computed(function () {
                                return !(U.value || c.value !== 0 || N$1);
                            });
                            return d$1(E$2, ue$1, function (e) {
                                var a;
                                return {
                                    containers: [].concat(_toConsumableArray((a = e.containers) != null ? a : []), [B])
                                };
                            }), watchEffect(function (e) {
                                if (c.value !== 0) return;
                                var a = o$1(m);
                                if (!a) return;
                                var d = new ResizeObserver(function (f) {
                                    var _iterator14 = _createForOfIteratorHelper(f),
                                        _step14;
                                    try {
                                        for (_iterator14.s(); !(_step14 = _iterator14.n()).done;) {
                                            var L = _step14.value;
                                            var _x = L.target.getBoundingClientRect();
                                            _x.x === 0 && _x.y === 0 && _x.width === 0 && _x.height === 0 && h.close();
                                        }
                                    } catch (err) {
                                        _iterator14.e(err);
                                    } finally {
                                        _iterator14.f();
                                    }
                                });
                                d.observe(a), e(function () {
                                    return d.disconnect();
                                });
                            }), function () {
                                var e = t.open,
                                    a = t.initialFocus,
                                    d = _objectWithoutProperties(t, _excluded7),
                                    f = _objectSpread(_objectSpread({}, l), {}, {
                                        ref: m,
                                        id: n,
                                        role: g.value,
                                        "aria-modal": c.value === 0 ? true : void 0,
                                        "aria-labelledby": M.value,
                                        "aria-describedby": re.value
                                    }),
                                    L = {
                                        open: c.value === 0
                                    };
                                return h$1(u$2, {
                                    force: true
                                }, function () {
                                    return [h$1($, function () {
                                        return h$1(z, {
                                            target: m.value
                                        }, function () {
                                            return h$1(u$2, {
                                                force: false
                                            }, function () {
                                                return h$1(ue, {
                                                    initialFocus: a,
                                                    containers: B,
                                                    features: k$1.value ? u$5(ee.value, {
                                                        parent: ue.features.RestoreFocus,
                                                        leaf: ue.features.All & ~ue.features.FocusLock
                                                    }) : ue.features.None
                                                }, function () {
                                                    return h$1(X, {}, function () {
                                                        return A$2({
                                                            ourProps: f,
                                                            theirProps: _objectSpread(_objectSpread({}, d), l),
                                                            slot: L,
                                                            attrs: l,
                                                            slots: p,
                                                            visible: c.value === 0,
                                                            features: N$2.RenderStrategy | N$2.Static,
                                                            name: "Dialog"
                                                        });
                                                    });
                                                });
                                            });
                                        });
                                    }), h$1(Z)];
                                });
                            };
                        }
                    }),
                    Ge = defineComponent({
                        name: "DialogPanel",
                        props: {
                            as: {
                                type: [Object, String],
                                default: "div"
                            },
                            id: {
                                type: String,
                                default: null
                            }
                        },
                        setup: function setup(t, _ref36) {
                            var i = _ref36.attrs,
                                l = _ref36.slots,
                                p = _ref36.expose;
                            var r;
                            var s = (r = t.id) != null ? r : "headlessui-dialog-panel-".concat(i$5()),
                                n = T("DialogPanel");
                            p({
                                el: n.panelRef,
                                $el: n.panelRef
                            });

                            function u(g) {
                                g.stopPropagation();
                            }

                            return function () {
                                var g = Object.assign({}, (_objectDestructuringEmpty(t), t)),
                                    D = {
                                        id: s,
                                        ref: n.panelRef,
                                        onClick: u
                                    };
                                return A$2({
                                    ourProps: D,
                                    theirProps: g,
                                    slot: {
                                        open: n.dialogState.value === 0
                                    },
                                    attrs: i,
                                    slots: l,
                                    name: "DialogPanel"
                                });
                            };
                        }
                    });
                var _hoisted_1 = {
                    class: "pointer-events-none absolute inset-0 grid place-items-center"
                };
                var __default__ = {
                    inheritAttrs: false
                };
                var _sfc_main = exports("_", /* @__PURE__ */defineComponent(_objectSpread(_objectSpread({}, __default__), {}, {
                    __name: "SimpleDialog",
                    props: /* @__PURE__ */mergeModels({
                        notCloseOnClick: {
                            type: Boolean
                        }
                    }, {
                        "modelValue": {
                            type: Boolean
                        },
                        "modelModifiers": {}
                    }),
                    emits: ["update:modelValue"],
                    setup: function setup(__props) {
                        var isOpen = useModel(__props, "modelValue");
                        return function (_ctx, _cache) {
                            return isOpen.value ? (openBlock(), createBlock(unref(Ye), {
                                key: 0,
                                class: "fixed top-0 z-800 h-full w-full",
                                open: isOpen.value,
                                onClose: _cache[0] || (_cache[0] = function ($event) {
                                    return _ctx.notCloseOnClick ? null : isOpen.value = false;
                                })
                            }, {
                                default: withCtx(function () {
                                    return [_cache[1] || (_cache[1] = createBaseVNode("div", {
                                        class: "absolute inset-0 bg-dark/60"
                                    }, null, -1)), createBaseVNode("div", _hoisted_1, [createVNode(unref(Ge), mergeProps(_ctx.$attrs, {
                                        class: "pointer-events-auto relative w-50% rounded-lg bg-light-200 shadow-xl"
                                    }), {
                                        default: withCtx(function () {
                                            return [renderSlot(_ctx.$slots, "default")];
                                        }),
                                        _: 3
                                    }, 16)])];
                                }),
                                _: 3
                            }, 8, ["open"])) : createCommentVNode("", true);
                        };
                    }
                })));
            }
        };
    });
})();
